﻿Public Class State
    Implements IObject

    Private id As Integer
    Private name As String
    Private scope As StateScope

    ' Constantes de Proyecto
    Public Const PROJECT_STATE_IN_PLANNING_ID As Integer = 1
    Public Const PROJECT_STATE_IN_PROCESS_ID As Integer = 2
    Public Const PROJECT_STATE_COMPLETED_ID As Integer = 3
    Public Const PROJECT_STATE_CANCEL_ID As Integer = 4

    ' Constantes de Tarea
    Public Const TASK_STATE_IN_PLANNING_ID As Integer = 5
    Public Const TASK_STATE_IN_PROCESS_ID As Integer = 6
    Public Const TASK_STATE_COMPLETED_ID As Integer = 7


    Public Sub New(ByVal id As Integer)
        Me.id = id
    End Sub

    Public Sub New()
    End Sub

    Public Sub New(ByVal scope As StateScope)
        Me.scope = scope
    End Sub

    Public Property idProperty() As Integer
        Get
            Return Me.id
        End Get
        Set(ByVal value As Integer)
            Me.id = value
        End Set
    End Property

    Public Property nameProperty() As String
        Get
            Return Me.name
        End Get
        Set(ByVal value As String)
            Me.name = value
        End Set
    End Property

    Public Property stateScopeProperty() As StateScope
        Get
            Return Me.scope
        End Get
        Set(ByVal value As StateScope)
            Me.scope = value
        End Set
    End Property

    Public Function getId() As Integer Implements IObject.getId
        Return id
    End Function

    Public Function getTableName() As String Implements IObject.getTableName
        Return "STATES"
    End Function
End Class
